<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      .box {
        width: 400px;
        height: 400px;
        margin: 300px auto;
        perspective: 1600px;
      }
      ul {
        width: 300px;
        height: 300px;
        list-style: none;
        margin: 50px auto;
        position: relative;
        transform-style: preserve-3d;
        animation: revolve 2s linear infinite;
        transform-origin: center center 150px;
      }
      li {
        width: 300px;
        height: 300px;
        position: absolute;
        color: seagreen;
        font-size: 40px;
        line-height: 300px;
        text-align: center;
        /* animation: revolve 2s linear infinite; */
      }
      li:nth-of-type(1) {
        background-color: chartreuse;
        opacity: 0.5;
      }
      li:nth-of-type(2) {
        background-color: pink;
        opacity: 0.5;
        transform: translateX(300px) rotateY(-90deg);
        transform-origin: left;
      }
      li:nth-of-type(3) {
        background-color: skyblue;
        opacity: 0.5;
        transform: translateX(-300px) rotateY(90deg);
        transform-origin: right;
      }
      li:nth-of-type(4) {
        background-color: yellowgreen;
        opacity: 0.5;
        transform: translateY(-300px) rotatex(-90deg);
        transform-origin: bottom;
      }
      li:nth-of-type(5) {
        background-color: red;
        opacity: 0.5;
        transform: translateY(300px) rotateX(90deg);
        transform-origin: top;
      }
      li:nth-of-type(6) {
        background-color: orange;
        opacity: 0.5;
        transform: translateZ(300px);
      }
      /* @keyframes revolve {
      from {
        transform: rotateY(0);
      }
      to {
        transform: rotateY(360deg);
      }
    } */
    </style>
  </head>
  <body>
    <div class="box">
      <ul>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </body>
</html>
